<?xml version="1.0"?>
<!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
<pdf>
  <head>
    <link name="NotoSans" type="font" subtype="truetype" src="${nsfont.NotoSans_Regular}" src-bold="${nsfont.NotoSans_Bold}" src-italic="${nsfont.NotoSans_Italic}" src-bolditalic="${nsfont.NotoSans_BoldItalic}" bytes="2" />
    <link name="NotoSansCJKsc" type="font" subtype="opentype" src="${nsfont.NotoSansCJKsc_Regular}" src-bold="${nsfont.NotoSansCJKsc_Bold}" bytes="2" />
    <style>
      *{
        <#if .locale == "zh_CN">
        font-family: NotoSans, NotoSansCJKsc, sans-serif;
        <#elseif .locale == "zh_TW">
        font-family: NotoSans, NotoSansCJKtc, sans-serif;
        <#elseif .locale == "ja_JP">
        font-family: NotoSans, NotoSansCJKjp, sans-serif;
        <#elseif .locale == "ko_KR">
        font-family: NotoSans, NotoSansCJKkr, sans-serif;
        <#elseif .locale == "th_TH">
        font-family: NotoSans, NotoSansThai, sans-serif;
        <#else>
        font-family: NotoSans, NotoSansCJKsc, sans-serif;
        </#if>
      }
      body {
        width: 21.5cm;
        height: 14cm;
        margin: 0;
        padding: 0;
        background-color: #FFFFFF;
        text-align: center;
      }
      table {
        table-layout:fixed;
        margin: 0 5px;
      }
      table td {
        font-size: 15px;
        height: 20px;
        text-align: center;
        word-wrap: break-word;
         word-break: break-all;
      }
      table td p {
        width: 100%;
        /*height: auto;*/
        color: #000;
        word-wrap: break-word;
        word-break: break-all;
      }
      table .td1 {
        width: 5%;
      }
      table .td2 {
        width: 8%;
      }
      table .td3 {
        width: 8%;
      }
      table .td4 {
        width: 8%;
      }
      table .td5 {
        width: 8%;
      }
      table .td6 {
        width: 10%;
      }
      table .td7 {
        width: 5%;
      }
      table .td8 {
        width: 5%;
      }
      table .td9 {
        width: 5%;
      }
      table .td10 {
        width: 5%;
      }
      table .td11 {
        width: 5%;
      }
      table .td12 {
        width: 5%;
      }
      table .td13 {
        width: 5%;
      }
      table .td14 {
        width: 9%;
      }
      table .td15 {
        width: 9%;
      }
      .leftBorder {
        border-left: 1px solid #000000;
      }
      .rightBorder {
        border-right: 1px solid #000000;
      }
      .topBorder {
        border-top: 1px solid #000000;
      }
      .bottomBorder {
        border-bottom: 1px solid #000000;
      }
      .border {
        border: 1px solid #000000;
      }
    </style>
	</head>
	<body>
    <#assign pageSize=((ir.items?size)/4)?ceiling ?number>

    <#list 1..pageSize as i>
    <#if i <= pageSize >
    <div style="height:100%">
    <table cellspacing="0" cellpadding="0" width="100%">
      <tr>
        <td  class="td1"></td>
        <td  class="td2"></td>
        <td  class="td3"></td>
        <td  class="td4"></td>
        <td  class="td5"></td>
        <td  class="td6"></td>
        <td  class="td7"></td>
        <td  class="td8"></td>
        <td  class="td9"></td>
        <td  class="td10"></td>
        <td  class="td11"></td>
        <td  class="td12"></td>
        <td  class="td13"></td>
        <td  class="td14"></td>
        <td  class="td15"></td>
      </tr>
      <tr>
        <td colspan="15">
          <p style="text-align: center;font-size: 30px;font-weight: 600;line-height: 30px;">
            收货单
          </p>
        </td>
      </tr>
      <tr>
        <td colspan="15">
          <p style="text-align: right;font-size: 20px;font-weight: 600;   ">
            — — — ${ir.subsidiary}
          </p>
        </td>
      </tr>
      <tr>
        <td colspan="12">
          <p style="text-align: left;font-size: 14px;  ">
            供应商：<span style="font-size: 14px;    text-decoration: underline;">${ir.vendor}</span>
          </p>
        </td>
        <td colspan="3">
          <p style="text-align: right;font-size: 14px;  ">
            NO:${ir.tranid}
          </p>
          <p style="text-align: right;font-size: 14px;  ">
            发货日期：${ir.trandate}
          </p>
        </td>
      </tr>
      <tr>
        <td class="td1 leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;font-weight: 600;   ">序号</p>
        </td>
        <td class="td2 leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;font-weight: 600;   ">订单/合同号</p>
        </td>
        <td class="td3 leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;font-weight: 600;   ">工单号</p>
        </td>
        <td class="td4 leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;font-weight: 600;   ">SKU</p>
        </td>
        <td class="td5 leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;font-weight: 600;   ">物料编码</p>
        </td>
        <td class="td6 leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;font-weight: 600;   ">中文名称</p>
        </td>
        <td class="td7 leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;font-weight: 600;   ">规格</p>
        </td>
        <td class="td8 leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;font-weight: 600;   ">颜色</p>
        </td>
        <td class="td9 leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;font-weight: 600;   ">色号</p>
        </td>
        <td class="td10 leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;font-weight: 600;   ">花型</p>
        </td>
        <td class="td11 leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;font-weight: 600;   ">花型号</p>
        </td>
        <td class="td12 leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;font-weight: 600;   ">采购/外发数量</p>
        </td>
        <td class="td13 leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;font-weight: 600;   ">实收数量</p>
        </td>
        <td class="td14 leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;font-weight: 600;   ">单位</p>
        </td>
        <td class="td15 leftBorder topBorder rightBorder">
          <p style="text-align: center;font-size: 10px;font-weight: 600;   ">备注</p>
        </td>
      </tr>
      <#assign totalQty=0?number>
      <#assign totalAllQty=0?number>

      <#list ir.items as item>
      <#if (item_index+1) gt 5*(i-1) && (item_index+1) lte 5*i>
      <#assign totalQty = totalQty+item.quantity?number>
      <#assign totalAllQty = totalAllQty+item.allQuantity?number>


      <tr>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;   ">${item.lineNumber}</p>
        </td>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;   ">${ir.contractno}</p>
        </td>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;   "></p>
        </td>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;   ">${item.sku}</p>
        </td>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;   ">${item.code}</p>
        </td>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;   ">${item.name}</p>
        </td>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;   ">${item.size}</p>
        </td>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;   ">${item.color}</p>
        </td>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;   ">${item.colorNumber}</p>
        </td>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;   ">${item.flowerType}</p>
        </td>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;   ">${item.flowerTypeColor}</p>
        </td>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;   ">${item.allQuantity}</p>
        </td>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;   ">${item.quantity}</p>
        </td>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 10px;   ">${item.unit}</p>
        </td>
        <td class="leftBorder topBorder rightBorder">
          <p style="text-align: center;font-size: 10px;   ">${item.remarks}</p>
        </td>
      </tr>
    </#if>
    </#list>

    <#if i = pageSize && (ir.items?size)%5 != 0>
    <#list 1..(5-((ir.items?size)%5)) as j>
    <#if j <= (5-((ir.items?size)%5)) >
    <tr>
      <td class="leftBorder topBorder">
        <p style="text-align: center;font-size: 14px;   ">${ir.items?size + j}</p>
      </td>
      <td class="leftBorder topBorder">
        <p style="text-align: center;font-size: 14px;   "></p>
      </td>
      <td class="leftBorder topBorder">
        <p style="text-align: center;font-size: 14px;   "></p>
      </td>
      <td class="leftBorder topBorder">
        <p style="text-align: center;font-size: 14px;   "></p>
      </td>
      <td class="leftBorder topBorder">
        <p style="text-align: center;font-size: 14px;   "></p>
      </td>
      <td class="leftBorder topBorder">
        <p style="text-align: center;font-size: 14px;   "></p>
      </td>
      <td class="leftBorder topBorder">
        <p style="text-align: center;font-size: 14px;   "></p>
      </td>
      <td class="leftBorder topBorder">
        <p style="text-align: center;font-size: 14px;   "></p>
      </td>
      <td class="leftBorder topBorder">
        <p style="text-align: center;font-size: 14px;   "></p>
      </td>
      <td class="leftBorder topBorder">
        <p style="text-align: center;font-size: 14px;   "></p>
      </td>
      <td class="leftBorder topBorder">
        <p style="text-align: center;font-size: 14px;   "></p>
      </td>
      <td class="leftBorder topBorder">
        <p style="text-align: center;font-size: 14px;   "></p>
      </td>
      <td class="leftBorder topBorder">
        <p style="text-align: center;font-size: 14px;   "></p>
      </td>
      <td class="leftBorder topBorder">
        <p style="text-align: center;font-size: 14px;   "></p>
      </td>
      <td class="leftBorder topBorder rightBorder">
        <p style="text-align: center;font-size: 14px;   "></p>
      </td>
    </tr>
</#if>
</#list>
</#if>
      <tr>
        <td class="leftBorder topBorder" colspan="11">
          <p style="text-align: center;font-size: 14px;   ">小计</p>
        </td>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 14px;   ">${totalAllQty}</p>
        </td>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 14px;   ">${totalQty}</p>
        </td>
        <td class="leftBorder topBorder ">
          <p style="text-align: center;font-size: 14px;   ">${ir.currency}</p>
        </td>
        <td class="leftBorder topBorder rightBorder">
          <p style="text-align: center;font-size: 14px;   "></p>
        </td>
      </tr>
      <tr>
        <td class="leftBorder topBorder" colspan="11">
          <p style="text-align: center;font-size: 14px;   ">总计</p>
        </td>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 14px;   ">${ir.totalAllQuantity}</p>
        </td>
        <td class="leftBorder topBorder">
          <p style="text-align: center;font-size: 14px;   ">${ir.totalQuantity}</p>
        </td>
        <td class="leftBorder topBorder ">
          <p style="text-align: center;font-size: 14px;   ">${ir.currency}</p>
        </td>
        <td class="leftBorder topBorder rightBorder">
          <p style="text-align: center;font-size: 14px;   "></p>
        </td>
      </tr>
      <tr>
        <td class="leftBorder topBorder rightBorder" colspan="15">
          <p style="width: 90%;text-align: right;font-size: 14px;   ">打印次数：${ir.printTimes} 次</p>
        </td>
      </tr>
      <tr>
        <td class="leftBorder topBorder bottomBorder" colspan="10">
          <table style="width: 100%;margin: 0;">
            <tr>
              <td colspan="4">
                <p style="text-align:left;font-size: 14px;   ">备注:${ir.memo}</p>
              </td>
            </tr>
            <tr>
              <td>
                <p style="text-align:left;font-size: 14px;   ">制表人:</p>
              </td>
              <td>
                <p style="text-align:left;font-size: 14px;   ">发货人:</p>
              </td>
              <td>
                <p style="text-align:left;font-size: 14px;   ">部门主管:</p>
              </td>
              <td>
                <p style="text-align:left;font-size: 14px;   ">供应商:</p>
              </td>
            </tr>
          </table>
        </td>
        <td class="leftBorder topBorder rightBorder bottomBorder" colspan="5">
          <p style="text-align: left;font-size: 14px;line-height: 15px;">送货车号:${ir.truckno}</p>
          <p style="text-align: left;font-size: 14px;line-height: 15px;">供&nbsp;&nbsp;&nbsp;总签收件数:${ir.totalreceiptnumber}</p>
          <p style="text-align: left;font-size: 14px;line-height: 15px;">应&nbsp;&nbsp;&nbsp;差异件数:${ir.differencenumber}</p>
          <p style="text-align: left;font-size: 14px;line-height: 15px;">商&nbsp;&nbsp;&nbsp;差异产品:${ir.differentproduct}</p>
        </td>
      </tr>
      <tr>
        <td colspan="13">
          <p style="text-align: left;font-size: 14px;   ">
            对加工商产生约束力之任何法律文件，均须经加工负责人或授权人签字方可生效
            <br />
            一式三联：第一联（白）：存根联；第二联（蓝）：会计记账；第三联（黄）：供应商留存联；
          </p>

        </td>
      </tr>
<tr>
  <td colspan="13">
    <p style="text-align: center;font-size: 14px;   ">
      ${i} / ${pageSize}
    </p>
  </td>
</tr>
    </table>
</div>
</#if>
</#list>
	</body>

</pdf>